//
//  HSPublic.h
//  customer
//
//  Created by Holothurian on 2018/10/19.
//  Copyright © 2018年 yinlong. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface HSPublic : NSObject

+ (UIColor *)colorWithHexString:(NSString *)color alpha:(CGFloat)alpha;

//默认alpha值为1
+ (UIColor *)colorWithHexString:(NSString *)color;

//计算时间
+ (NSString *)dataStringFromNumberTimer:(NSString *)timeString;

+ (UIImage *)imageByScalingToMaxSize:(UIImage *)sourceImage;

+ (UIImage *)imageByScalingAndCroppingForSourceImage:(UIImage *)sourceImage targetSize:(CGSize)targetSize;

+ (NSData *)hsZipDataWithImage:(UIImage *)sourceImage;

//返回高度
+ (CGFloat)hsBoundingRectWithHeightString:(NSString *)string SizeWidth:(CGFloat)sizeWidth Font:(UIFont *)font;

//返回宽度
+ (CGFloat)hsBoundingRectWithWidthString:(NSString *)string SizeHeight:(CGFloat)sizeHeight Font:(UIFont *)font;

@end

NS_ASSUME_NONNULL_END
